package snake.gameplay;


public class Position {

    private int coordinateX;

    private int coordinateY;

    public Position () {
    }

    public Position (int coordinateX, int coordinateY) {
        this.coordinateX = coordinateX;
        this.coordinateY = coordinateY;
    }
    
    public int getCoordinateX () {
        return coordinateX;
    }

    public void setCoordinateX (int val) {
        this.coordinateX = val;
    }

    public int getCoordinateY () {
        return coordinateY;
    }

    public void setCoordinateY (int val) {
        this.coordinateY = val;
    }
    
    public static Position sumPositions(Position pos1, Position pos2) {
        return new Position(pos1.getCoordinateX()+pos2.getCoordinateX(),pos1.getCoordinateY()+pos2.getCoordinateY());
    }

}

